<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@ include file="/commons/taglibs.jsp" %>
<%@ include file="/commons/script.jsp" %>
<script type="text/javascript" src="${ctx }/assets/js/pinyin_dict_notone.js"></script>
<script type="text/javascript" src="${ctx }/assets/js/pinyinUtil.js"></script>
<body>
<script>
jQuery(function($) {
	formvalidation("#addForm",{
		configName:{
			remote:{
				url:"${ctx}/generatorConfig/json/checkConfigName",
				data:{
					id:$("#id").val()
				}
			}
		}
	},{
		configName:{
			remote:"<fmt:message key='GeneratorConfig.error.nameExist'/>"
		}
	})
	$("#saveBtn").click(function(){
		$("#addForm").submit();
	})
})
</script>
<fmt:message key="label.pleaseInput" var="pleaseInput"></fmt:message>
<fmt:message key="GeneratorConfig.configName.title" var="configNameTitle"></fmt:message>
<fmt:message key="GeneratorConfig.configValue.title" var="configValueTitle"></fmt:message>
<fmt:message key="GeneratorConfig.configDesc.title" var="configDescTitle"/>
	<form:form action="${ctx }/generatorConfig/popup/save" id="addForm" name="addForm" modelAttribute="generatorConfig" method="post">
		<form:hidden path="id"/>
		<div class="form-group">
					<label class="control-label col-md-3"> <span class="required">*</span> 
					${configNameTitle }:
					</label>
				<div class="col-md-6">
					<form:input path="configName" cssClass="form-control required" maxlength="45" placeHolder='${pleaseInput } ${configNameTitle }'/>
				</div>
		</div>
		<div class="form-group">
				<label class="control-label col-md-3"> 
				${configValueTitle }:
				</label>					
				<div class="col-md-6">
					<form:input path="configValue" cssClass="form-control" maxlength="250"  placeHolder="${pleaseInput } ${configValueTitle }"/>
				</div>
		</div>
		
		<div class="form-group">
				<label class="control-label col-md-3"> 
				${configValueTitle }:
				</label>					
				<div class="col-md-6">
					<form:input path="configDesc" cssClass="form-control" maxlength="250"  placeHolder="${pleaseInput } ${configValueTitle }"/>
				</div>
		</div>
		
		<div class="form-group">	
				<div class="col-md-6">
					<a id="saveBtn" class="btn btn-primary"><fmt:message key="navigation.button.save"></fmt:message> </a>
					<a id="cancelBtn" class="btn btn-danger"  onclick="top.Dialog.close()"><fmt:message key="navigation.button.cancel"/></a>
					
				</div>
		</div>
		<div id="afterupdate"></div>
	</form:form>
</body>
